<script setup>
import { reactive, toRefs } from 'vue'
const user = reactive({
  name: 'jack',
  age: 18
})

let { name, age } = toRefs(user)
const btn = () => {
  console.log(name, age, 1211);
  name.value = 'rose'
  age.value += 2
}
</script>
<template>
  <div>
    御剑乘风来,除魔天地间!===vue3==={{ user.name }}=={{ user.age }}==解构=={{ name }}=={{ age }}
    <button @click="btn">按钮</button>
  </div>
</template>
<style lang='less'  scoped>
</style>